package com.share.three.springCluster;

import javax.jms.JMSException;
import javax.jms.Message;
import javax.jms.Session;
import javax.jms.TextMessage;

import org.springframework.jms.listener.SessionAwareMessageListener;

public class Receiver implements SessionAwareMessageListener<Message>{

	@Override
	public void onMessage(Message message, Session session) throws JMSException {
		TextMessage textMessage = (TextMessage)message;
		String msg = textMessage.getText();
		System.out.println("接收消息： " + msg);
		
	}

}
